import Vue from "vue";
import VueRouter from "vue-router";

// 入口/1
import Home from "../views/Home.vue";
// 首页/2
import Shouye from "../views/Home/Shouye.vue";
import List from "../views/Home/List.vue";
// list/3
import Concerts from "../views/Home/List/Concerts.vue";
import All from "../views/Home/List/All.vue";

import Mine from "../views/Home/Mine.vue";
// 内容-1
import Content from "../views/Content.vue";
import Login from "../views/Login.vue";
import City from "../views/City.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: Home,
    children: [
      // 2
      {
        path: "4403",
        component: Shouye
      },
      {
        path: "list",
        component: List,
        children: [
          // 3
          // {
          //   path: "",
          //   redirect: "/list/4403-all"
          // },
          {
            path: "4403-all",
            component: All
          },
          {
            path: "4403-concerts",
            component: Concerts
          }
        ]
      },
      // mine-2
      {
        path: "mine",
        component: Mine
      }
    ]
  },
  // city-1
  {
    path: "/city",
    component: City
  },
  {
    path: "/content/:id",
    component: Content
  },
  {
    path: "/login",
    component: Login
  }
];

const router = new VueRouter({
  routes
});

export default router;
